import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [{
    path: '/pswModify',
    name: 'pswModify',
    component: () =>
        import('@/views/my/password/index.vue'),
    meta: {
        title: '密码修改'
    }
}, {
    path: '/monthCash',
    name: 'monthCash',
    component: () =>
        import('@/views/my/monthCash/index.vue'),
    meta: {
        title: '月兑付单'
    }
}, {
    path: '/recommendProducts',
    name: 'recommendProducts',
    component: () =>
        import('@/views/my/recommendProducts/index.vue'),
    meta: {
        title: '在售产品推荐表'
    }
}, {
    path: '/monthCashList',
    name: 'monthCashList',
    component: () =>
        import('@/views/my/monthCashList/index.vue'),
    meta: {
        title: '月兑付明细'
    }
},
{
    path: '/userInfo',
    name: 'userInfo',
    component: () =>
        import('@/views/my/userInfo/index.vue'),
    meta: {
        title: '个人资料'
    }
}, {
    path: '/customerInfo',
    name: 'customerInfo',
    component: () =>
        import('@/views/my/customerInfo/index.vue'),
    meta: {
        title: '意向客户',
        keepAlive: true //路由缓存
    }
},
{
    path: '/signIn',
    name: 'signIn',
    component: () =>
        import ('@/views/signIn/index.vue'),
    meta: {
        title: '签到'
    }
}, 
{
    path: '/customerInfo/add',
    name: 'customerInfoAdd',
    component: () =>
        import('@/views/my/customerInfo/add/index.vue'),
    meta: {
        title: '添加意向客户'
    }
}, {
    path: '/customerInfo/detail',
    name: 'customerInfoAdd',
    component: () =>
        import('@/views/my/customerInfo/detail/index.vue'),
    meta: {
        title: '意向客户详情'
    }
}, {
    path: '/order',
    name: 'order',
    component: () =>
        import('@/views/my/order/index.vue'),
    meta: {
        title: '订单列表'
    }
},
{
    path: '/customerOrder',
    name: 'customerOrder',
    component: () =>
        import('@/views/my/customerOrder/index.vue'),
    meta: {
        title: '订单列表'
    }
}, {
    path: '/cashing-order',
    name: 'cashing-order',
    component: () =>
        import('@/views/my/cashingOrder/index.vue'),
    meta: {
        title: '待兑付订单'
    }
}, {
    path: '/birthday-list',
    name: 'birthday-list',
    component: () =>
        import('@/views/birthdayList/index.vue'),
    meta: {
        title: '生日列表'
    }
}, {
    path: '/order/detail/:id',
    name: 'orderDetail',
    component: () =>
        import('@/views/my/order/Detail.vue'),
    meta: {
        title: '订单详情'
    }
}, {
    path: '/order/payList/:id',
    name: 'order',
    component: () =>
        import('@/views/my/order/payList.vue'),
    meta: {
        title: '分期列表'
    }
},
{
    path: '/myCustomer',
    name: 'myCustomer',
    component: () =>
        import('@/views/my/myCustomer/index.vue'),
    meta: {
        title: '我的客户'
    }
},
// {
//   path: '/companyBrief/:id',
//   name: 'companyBrief',
//   component: () => import('@/views/my/companyBrief/index.vue')
// },
{
    path: '/productDetail/:id',
    name: 'productDetail',
    component: () =>
        import('@/views/productDetail/index.vue'),
    meta: {
        title: '产品详情'
    }
},
{
    path: '/productCombDetail/:id',
    name: 'productCombDetail',
    component: () =>
        import('@/views/financeDetail/productCombDetail.vue'),
    meta: {
        title: '组合介绍'
    }
},
{
    path: '/financeDetail/:id',
    name: 'financeDetail',
    component: () =>
        import('@/views/financeDetail/index.vue'),
    meta: {
        title: '产品详情'
    }
},
{
    path: '/userAdd',
    name: 'userAdd',
    component: () =>
        import('@/views/userAdd/index.vue')
},
{
    path: '/login',
    name: 'login',
    component: () =>
        import('@/views/login/index.vue'),
    meta: {
        title: '用户登录'
    }
},
{
    path: '/register',
    name: 'register',
    component: () =>
        import('@/views/register/index.vue'),
    meta: {
        title: '用户注册'
    }
},

{
    path: '/myFinancialManager',
    name: 'myFinancialManager',
    component: () =>
        import('@/views/myFinancialManager/index.vue'),
    meta: {
        title: '我的理财经理'
    }
},
{
    path: '/videoList',
    name: 'videoList',
    component: () =>
        import('@/views/videoList/index.vue'),
    meta: {
        title: '金融学堂'
    }
},
{
    path: '/videoDetail/:id',
    name: 'videoDetail',
    component: () =>
        import('@/views/videoDetail/index.vue'),
    meta: {
        title: '视频'
    }
},
{
    path: '/bindPhone',
    name: 'bindPhone',
    component: () =>
        import('@/views/bindPhone/index.vue'),
    meta: {
        title: '绑定手机号'
    }
},
{
    path: '/article',
    name: 'article',
    component: () =>
        import('@/views/article/index.vue'),
    meta: {
        title: '文章列表'
    }
},
{
    path: '/article/detail/:id',
    name: 'articleDetail',
    component: () =>
        import('@/views/article/detail.vue'),
    meta: {
        title: '文章详情'
    }
},
{
    path: '/upload/wxWorkQrcode',
    name: 'wxWorkQrcode',
    component: () =>
        import('@/views/upload/wxWorkQrcode/index.vue'),
    meta: {
        title: '上传企微二维码'
    }
},
{
    path: '/',
    redirect: '/home',
    component: () =>
        import('@/views/layout/index.vue'),
    children: [{
        path: '/home',
        name: 'home',
        component: () =>
            import('@/views/home/index.vue'),
        meta: {
            title: '首页'
        },
    },
    // {
    //     path: '/topProduct',
    //     name: 'topProduct',
    //     component: () =>
    //         import('@/views/topProduct/index.vue'),
    //     meta: {
    //         title: '优选项目'
    //     }
    // },
    {
        path: '/topProduct',
        name: 'topProduct',
        component: () =>
            import('@/views/financeList/index.vue'),
        meta: {
            title: '优选项目'
        }
    }, {
        path: '/my',
        name: 'my',
        component: () =>
            import('@/views/my/index/index.vue'),
        meta: {
            title: '个人中心'
        },
    }
    ]
},
]

const router = new VueRouter({
    mode: 'history',
    base: '/zqjx-h5/',
    routes
})

export default router